<?php

namespace app\admin\validate\user;

use think\Validate;

class Address extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name' => 'require',
        'mobile' => 'require',
        'province_id' => 'require',
        'city_id' => 'require',
        'county_id' => 'require',
        'detail' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'name.require' => '姓名必填',
        'mobile.require' => '手机号必填',
        'province_id.require' => '省份必填',
        'city_id.require' => '城市必填',
        'county_id.require' => '区县必填',
        'detail.require' => '详细地址必填',

    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['name', 'mobile', 'province_id', 'city_id', 'county_id', 'detail'],
        'edit' => [],
    ];
    
}
